package com.nats.sample.common.util;

import io.nats.client.Connection;
import io.nats.client.Nats;
import java.io.IOException;

public class NatsConnUtil {

  public static final String NATS_URL = "nats://192.168.37.101:4222";

  public static Connection getConn(){
    try {
      return Nats.connect(NATS_URL);
    } catch (IOException e) {
      throw new RuntimeException(e);
    } catch (InterruptedException e) {
      throw new RuntimeException(e);
    }
  }

}
